package us.demo.service;

import java.util.UUID;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import us.demo.dao.UserDao;
import us.demo.entity.User;

@Service
public class UserService {
	@Autowired
	private UserDao dao;
	public User get(String id){
		return dao.get(id);
	}
	
	public int insert(User user){
		user.setId(UUID.randomUUID().toString());
		
		return dao.insert(user);
	}
	
	public int delete(String id){
		return dao.delete(id);
	}
}
